<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function copyobj(target) {
        let newobj = JSON.parse(JSON.stringify(target));
        return newobj;
      }

      const obj = {
        array: [12, 34, 56, 77],
        num: "12,23",
        name: "鸡太美",
      };
      console.log(copyobj(obj));
    </script>
  </body>
</html>
